<?php

/** @var \Illuminate\Database\Eloquent\Factory $factory */


use Faker\Generator as Faker;
use Illuminate\Support\Str;

$factory->define(\App\Models\Curse\Curse::class, function (Faker $faker) {

    $classCount = \App\Models\Curse\CurseClass::query()->count();

    return [
        'name' => $faker->title.'课程',//Str::random(10),
        'class_id' => rand(1, $classCount),
        'original_price' => rand(1,999),
        'sell_price' => rand(1,999),
        'sell_price' => rand(1,999),
        'deposit_ratio' => rand(1,100),
        'is_recommend' => rand(1,2),
        'visit' => rand(1,999),
        'info' =>  $faker->randomHtml(10), //Str::random(999),
        'cover_img' => $faker->imageUrl()
    ];
});
